package com.wanmait.wanmarecruit.filter;

import com.wanmait.wanmarecruit.util.SystemContext;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

@WebFilter("/manage/*")
public class ManageFilter implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        SystemContext.setRequest((HttpServletRequest) servletRequest);
        filterChain.doFilter(servletRequest,servletResponse);
        SystemContext.clear();
    }
}
